﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetFrameworkExtensions.BusinessLayer
{
  public interface IItemContainer
  {
    IIdentified CreateFrom(IIdentified item);
    IIdentified RemoveFrom(IIdentified item);
  }

  public interface IItemContainer<TIdentifier>
    where TIdentifier : IEquatable<TIdentifier>
  {
    IIdentified<TIdentifier> CreateFrom(IIdentified<TIdentifier> item);
    IIdentified<TIdentifier> RemoveFrom(IIdentified<TIdentifier> item);
  }

  public interface IItemContainer<TIdentified, TIdentifier>
    where TIdentified : class, IIdentified<TIdentified, TIdentifier>
    where TIdentifier : IEquatable<TIdentifier>
  {
    IIdentified<TIdentified, TIdentifier> CreateFrom(IIdentified<TIdentified, TIdentifier> item);
    IIdentified<TIdentified, TIdentifier> RemoveFrom(IIdentified<TIdentified, TIdentifier> item);
  }
}
